<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css</title>
    <style>
        .col{

            background-color: red;
            width: 100px;
            height:100px;
            float:left;
            display:inline-block;
            margin-left: 20px;
        }

        .row{
            　position: relative;

        }

        .con{
            position: absolute;
            top:10%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
    </style>
</head>
<body>
<div class='row'>
    <div class='con'>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
        <div class="col">
            <span></span>
        </div>
    </div>
</div>
</body>
</html>